{include file="public/header"}
<title>我的发布</title>
<style>

    .pagination{
        /*height: 28px !important;*/
        /*line-height:28px;*/
        /*margin-top:30px;*/
        /*padding-right:33px;*/
        color:#999;
        font-size:12px;
    }
    .pagination div{
        margin-left:5px;
        margin-right:5px;
    }
    .pagination div:nth-child(2){
        margin-right:15px;
    }
    .pagination div:nth-child(6){
        color:#282828;
    }
    .pagination div:nth-child(8){
        margin-left:15px;
    }
    body{
        width:100%;
        height:100%;
        margin:0;
        padding:0;
        background-color: #F7F7F7;
    }
    /*头部*/
    .top{
        height: 60px;
        width: 100%;
        background:rgba(22,26,39,1);
    }
    .top_box{
        width: 1200px;
        height: 100%;
        margin: 0 auto;
        align-items: center;

    }
    .top_name_left{
        width:38px;
        height:38px;
        background:rgba(52,99,230,1);
        border-radius:10px;
        margin-right: 10px;
    }
    .top_name{
        height:60px;
        font-size:24px;
        font-family:PingFangSC-Medium;
        font-weight:500;
        color:rgba(255,255,255,1);
        line-height:60px;
    }
    .top_name_r{
        width:76px;
        height:30px;
        border-radius:15px;
        border:1px solid rgba(255,255,255,1);
        margin-left:26px;
        align-items: center;
        justify-content: center;
        display: flex;
    }
    .top_name_r img{
        height: 16px;
        width: 16px;
    }
    .top_name_r span{
        height:22px;
        line-height: 22px;
        font-size:16px;
        font-family:PingFangSC-Regular;
        font-weight:400;
        color:rgba(255,255,255,1);
        margin-left: 3px;
    }
    .lii{
        height:22px;
        font-size:16px;
        font-family:PingFangSC-Regular;
        font-weight:400;
        color:rgba(255,255,255,1);
        line-height:22px;
        margin-right: 24px;
    }
    .top_login{
        margin-left: 36px;
        display: flex;
        align-items: center;
    }
    .top_login img{
        width: 28px;
        height: 28px;
    }
    .top_login span{
        height:22px;
        font-size:16px;
        font-family:PingFangSC-Regular;
        font-weight:400;
        color:rgba(255,255,255,1);
        line-height:22px;
        margin-left: 8px;
    }
    .top_marginR{
        margin-right: 16px;
    }
    /*头部*/

    /*footer1样式*/
    .footer{
        width:100%;
        height:130px;
        background:rgba(31,31,31,1);
        display: flex;
        align-items: center;
    }
    .footer_in{
        width: 1210px;
        margin: 0 auto;
        height:18px;
        font-size:13px;
        font-family:PingFangSC-Regular;
        font-weight:400;
        color:rgba(153,153,153,1);
        line-height:18px;
    }
    /*footer1样式*/
    .bar{
        width:1200px;
        height:57px;
        align-items:center;
        margin: 0 auto;
        font-size:12px;
        color:#999999;
    }
    .right_arrow{
        width:14px;
        height:14px;
        margin-left:6px;
        margin-right:6px;
    }
    .box{
        width:1200px;
        margin: 0 auto;
        margin-bottom:30px;
    }
    .left{
        width:150px;
        background:#FFFFFF;
        box-shadow:0px 4px 10px 0px rgba(0,0,0,0.04);
        border-radius:4px;
        margin-right:20px;
        height: 520px;
    }
    .right{
        background:#FFFFFF;
        box-shadow:0px 4px 10px 0px rgba(0,0,0,0.04);
        border-radius:4px;
        padding:42px 40px 0px 40px;
    }
    .avatar,.avatar img{
        width:80px;
        height:80px;
        border-radius:50%;
    }
    .avatar{
        margin:20px auto 10px;
    }
    .avatar img{
        object-fit: cover;
    }
    .phone{
        text-align:center;
        font-size:14px;
        color:#333;
        margin-bottom:20px;
    }
    .title{
        font-size:14px;
        color:#333;
        height:40px;
        line-height:40px;
        text-align: left;
        width: 58px;
        padding: 0 46px;
    }
    .hover:hover{
        text-decoration:underline;
        cursor:hand;
        cursor:pointer;
    }
    .blue{
        font-size:14px;
        color:#FFFFFF;
        height:40px;
        line-height:40px;
        text-align: left;
        width: 58px;
        padding: 0 46px;
        background-color:#3463E6;
    }
    /*列表的样式在这里*/
    .con_li{
        height: 184px;
        /*width: 100%;*/
        display: flex;
        align-items: center;
        padding-bottom:40px;
    }
    .con_li > img{
        width: 245px;
        height: 100%;
    }
    .con_li > span{
        height:32px;
        font-size:26px;
        font-family:Helvetica-Bold;
        font-weight:bold;
        color:rgba(231,99,76,1);
    }
    .con_li_word{
        height: 100%;
        margin-left: 20px;
    }
    .con_li_top{
        height:24px;
        font-size:22px;
        font-family:PingFangSC-Medium;
        font-weight:500;
        color:rgba(51,51,51,1);
        line-height:24px;
        margin-bottom: 20px;
        cursor: pointer;
    }
    .con_li_ion{
        height:20px;
        font-size:14px;
        font-family:PingFangSC-Regular;
        font-weight:400;
        color:rgba(102,102,102,1);
        line-height:20px;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
    }
    .con_li_ion_marginb{
        margin-bottom: 16px;
    }
    .con_li_ion > img{
        width: 16px;
        height: 16px;
        margin-right: 10px;
    }
    .con_li_label{
        height: 30px;
        margin-top: 24px;
    }
    .con_li_labels{
        min-width: 60px;
        height:30px;
        background:rgba(230,237,255,1);
        border-radius:4px;
        margin-right: 10px;
        font-size:13px;
        font-family:PingFangSC-Regular;
        font-weight:400;
        color:rgba(53,86,179,1);
        line-height: 30px;
        text-align: center;
        padding: 0 10px;
    }
    /*列表的样式在这里*/
    .righttt{
        width: 1030px;
    }
    .price{
        font-size:14px;
        color:#E7634C;
        padding-top:33px;
        padding-bottom:20px;
        text-align:right;
    }
    .red{
        font-size:26px;
        font-weight:bold;
    }
    .phone{
        font-size:14px;
        color:#999;
    }
    .tel{
        font-size:20px;
        color:#333;
    }
    /*删除、已成交*/
    .houseButton{
        text-align: right;
        width: 40%;
    }
    .houseButton button{
        width: 100px;
        height: 40px;
        background-color: #3463E6;
        border-radius: 6px;
        font-size: 14px;
        color: #fff;
        line-height: 40px;
        text-align: center;
        cursor: pointer;
        margin-left: 10px;
    }
</style>
<body>

<div class="bar flex-wrap">
    置家优选 <img src="__IMG__/right_arrow.png" class="right_arrow" />个人中心
</div>
<div class="box flex-wrap">
    {include file="public/body"}
    <div class="righttt flex-con">
        <div class="right">
            {if $user_type != 3}
            {volist name="data"  id="vo"}
            <div class="con_li">
                <img src="{$vo['h_img']}" alt="" onclick="godetail({$vo.h_id});" style="cursor: pointer;">
                <div class="con_li_word flex-con">
                    <div class="flex-wrap">
                        <div class="con_li_top" style="width: 60%;" onclick="godetail({$vo.h_id});">
                            {$vo.h_title}
                        </div>
                        <div class="con_li_top houseButton">
                            {if $vo.h_done==1}
                            <button onclick="houseDone({$vo.h_id});">确认成交</button>
                            {else /}
                            已成交
                            {/if}
                            <button onclick="houseDel({$vo.h_id});" style="background-color: orangered;">删除房源</button>
                        </div>
                    </div>
                    <div class="flex-wrap">
                        <div class="flex-con">
                            <div class="con_li_ion">
                                <img src="__IMG__/ion2.png" alt="">
                                <span>{$vo['district']}/{$vo['h_xiaoqu']}</span>
                            </div>
                            <div class="con_li_ion con_li_ion_marginb">
                                <img src="__IMG__/home.png" alt="">
                                <span>{$vo['h_shis']}室{$vo['h_tings']}厅</span>
                            </div>
                            <div class="con_li_ion">
                                <img src="__IMG__/area.png" alt="">
                                <span>{$vo['h_mianji']}m² </span>
                            </div>
                            <div class="con_li_label flex-wrap">
                                {volist name="vo['sign_name']" id="vv"}
                                <div class="con_li_labels">
                                    {$vv}
                                </div>
                                {/volist}
                            </div>
                        </div>
                        <div>
                            <div class="price"><span class="red">{$vo.price}</span>
                                {if $vo['h_type']==1}
                                元/月
                                {else  /}
                                万
                                {/if}
                            </div>
                            <!--<div class="phone">联系方式：<span class="tel"></span></div>-->
                        </div>
                    </div>
                </div>
            </div>
            {/volist}
            {else /}
            {volist name="data"  id="vo"}
            <div class="con_li">
                <img src="{$vo['cc_thumb']}" alt="" onclick="gocasedetail({$vo.cc_id});" style="cursor: pointer;">
                <div class="con_li_word flex-con">
                    <div class="con_li_top" onclick="gocasedetail({$vo.cc_id});">
                        {$vo.cc_title}
                    </div>
                    <div class="flex-wrap">
                        <div class="flex-con">
                            <div class="con_li_ion">

                            </div>
                            <div class="con_li_ion con_li_ion_marginb">
                                <img src="__IMG__/home.png" alt="">
                                <span>{$vo['cc_name']}</span>
                            </div>
                            <div class="con_li_ion">

                            </div>
                            <div class="con_li_label flex-wrap">
                                <div class="con_li_labels">
                                    {$vo['cc_style']}
                                </div>
                            </div>
                        </div>
                        <div>

                        </div>
                    </div>
                </div>
            </div>
            {/volist}
            {/if}
            <ul class="pagination flex-con" style="display: flex;justify-content: flex-end;">
                {$page}
            </ul>
        </div>
    </div>


</div>

{include file="public/foot1"}
</body>

</html>
<script src="/static/admin/js/jquery.min.js"></script>
<script>
    //-------------------跳转到详情----------------------
    function godetail(hid) {
        window.location.href = '/home/Index/houseInfo?h_id='+hid;
    }
    function gocasedetail(cc_id) {
        window.location.href = '/home/Renovation/casedetail?cc_id='+cc_id;
    }
    //-----------------------end------------------
    function houseDone(hid) {
        ajaxHouse(hid,1,'确认此房源已成交吗？');
    }
    function houseDel(hid) {
        ajaxHouse(hid,2,'确定要删除房源吗？');
    }
    function ajaxHouse(id,type,text) {
        if(confirm(text)){
            var url = '/home/User/deleteMyHouse';
            if(type == 1){
                url = '/home/User/doneMyHouse';
            }
            $.ajax({
                url: url,
                data: 'h_id='+id,
                type: 'POST',
                dataType: 'JSON',
                success: function (returnData) {

                    if(returnData.status == 200){
                        location.reload();
                        return true;
                    }else{
                        alert(returnData.msg);
                    }
                },
                error: function () {
                    alert('服务器错误，请刷新重试！');
                }
            })
        }
    }
</script>